package com.example.demo.controller;



import com.example.demo.entity.User;
import com.example.demo.services.IUserService;
import com.example.demo.services.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Fyly
 * @since 2019-02-20
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private IUserService iuserService;

    @RequestMapping(value = "/getUser", method = RequestMethod.GET)
    @ResponseBody
    public User helloUser() {
        User user = iuserService.getUserById(1);
        System.out.println(user);
        return user;
    }
}

